Data Analysis by R

Text mining by R

When doing text mining , it starts with converting the text into table data.

Word cloud

This is an example of Word Cloud .

In this example, it is assumed that the folder named "Rtest" on the C drive contains the data named "TextData.csv". It is assumed that the first column contains the word with the variable name "Term" and the second column contains the number of occurrences with the variable name "Freq".

Also, install a library called wordcloud in advance.

setwd("C:/Rtest")
library(wordcloud)
TextData <- read.table("TextData.csv", header=T, sep=",")
wordcloud(TextData$Term, TextData$Freq, min.freq=100, color=brewer.pal(8, "Dark2"))# Draw a graph containing 100 or more words



Tweet